<table>
	<thead>
		<tr>
			<g:sortableColumn property="serialNumber" title="Serial Number" titleKey="b2b.category.serialNumber" />
			<th><g:message code="b2b.category.recordType" default="Record Type" /></th>
			<g:sortableColumn property="name" title="Name" titleKey="b2b.category.name" />
			<g:sortableColumn property="discount" title="Discount" titleKey="b2b.category.discount" />
			<g:sortableColumn property="productionCycle" title="Production Cycle" titleKey="b2b.category.productionCycle" />
			<g:sortableColumn property="transportCycle" title="Transport Cycle" titleKey="b2b.category.transportCycle" />
			<g:sortableColumn property="deliveryCycle" title="Delivery Cycle" titleKey="b2b.category.deliveryCycle" />
			<g:sortableColumn property="hasBom" title="Has Bom" titleKey="b2b.category.hasBom" />
            <g:sortableColumn property="isAllowSpecialDiscount" title="Allow OA SpecialDiscount?" titleKey="b2b.category.isAllowSpecialDiscount" />
            <g:sortableColumn property="isAllowZeroPrice" title="Allow Zero Price?" titleKey="b2b.category.isAllowZeroPrice" />
            <g:sortableColumn property="isActive" title="Active?" titleKey="b2b.category.isActive" />
			<g:sortableColumn property="dateCreated" title="Date Created" titleKey="b2b.category.dateCreated" />
			<g:sortableColumn property="lastUpdated" title="Last Updated" titleKey="b2b.category.lastUpdated" />
		</tr>
	</thead>
	<tbody>
	<g:each in="${categoryInstanceList}" status="i" var="categoryInstance">
		<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
			<td><g:link action="show" id="${categoryInstance.id}">${fieldValue(bean: categoryInstance, field: "serialNumber")}</g:link></td>
			<td>${fieldValue(bean: categoryInstance, field: "recordType")}</td>
			<td>${fieldValue(bean: categoryInstance, field: "name")}</td>
			<td>${fieldValue(bean: categoryInstance, field: "discount")}</td>
			<td>${fieldValue(bean: categoryInstance, field: "productionCycle")}</td>
			<td>${fieldValue(bean: categoryInstance, field: "transportCycle")}</td>
			<td>${fieldValue(bean: categoryInstance, field: "deliveryCycle")}</td>
			<td><g:formatBoolean boolean="${categoryInstance?.hasBom}" /></td>
            <td><g:formatBoolean boolean="${categoryInstance?.isAllowSpecialDiscount}" /></td>
            <td><g:formatBoolean boolean="${categoryInstance?.isAllowZeroPrice}" /></td>
            <td><g:formatBoolean boolean="${categoryInstance?.isActive}" /></td>
			<td>${fieldValue(bean: categoryInstance, field: "dateCreated")}</td>
			<td>${fieldValue(bean: categoryInstance, field: "lastUpdated")}</td>
		</tr>
	</g:each>
	</tbody>
</table>
